package com.spring.campus_express_delivery.dao;

import com.spring.campus_express_delivery.entity.Orders;
import com.spring.campus_express_delivery.entity.Users;
import com.sun.org.apache.xpath.internal.operations.Or;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;

@Repository("OrdersDao")
@Mapper
public interface OrdersDao {
//    按照类型查询
List<Orders> selectOrderTypeByPage(HashMap<String, Object> map);
    //添加订单
    void insertOrder(Orders orders);
    //根据订单编号修改订单状态中需要先根据订单编号查询出对应的订单
    Orders selectId(Integer id);
    //根据id修改订单状态(接单）
    void updateOrderStatus(Orders orders);
    //根据id修改订单状态（确认收货）
    void updateOrderStatusByF(Orders orders);
    //根据id修改订单状态（取消接单）
    void updateOrderStatusByCancel(Orders orders);
    //修改订单
    void updateOrders(Orders orders);
    //快递重量类型列表
    List<Orders> selectOrderWeightByPage(HashMap<String, Object> map);
    //统计数目
    int selectCountByOrders();
    //根据快递编号查询订单编号
    Orders selectOrderNumByExpressNum(String expressNum);
    //根据订单状态查询订单
    Orders selectOrderStatus(String order_status);
    //用户发布的个人订单列表
    List<Orders> selectOrdersSelfByPage(HashMap<String, Object> map);
    //接单页面的订单列表
    List<Orders> selectOrdersByPage(HashMap<String, Object> map);
    //用户接单的订单列表
    List<Orders> selectBySender(HashMap<String,Object> map);
    //删除订单
    void deleteOrderById(Integer id);
    //根据快递重量类型查询订单
    List<Orders> selectOrderByExpressWeightTypeByPage(HashMap<String, Object> map);
    //根据快递公司类型查询订单
    List<Orders> selectOrderByExpressCompanyTypeByPage(HashMap<String, Object> map);
    //根据送达地址查询订单
    List<Orders> selectOrderByServiceAddressByPage(HashMap<String, Object> map);
    //根据订单状态查询订单
    List<Orders> selectOrderByOrderStatusByPage(HashMap<String, Object> map);
    //根据订单id修改快递进度
    void updateMiddle_address(Orders orders);
    //查询所有订单
    List<Orders> selectAllOrders();
    //根据取件码查询订单信息
    List<Orders> selectOrderByPick_code(String keyWord);

}
